<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">

<title>Picones!</title>

<!-- Bootstrap core CSS -->
<link href="rec/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="rec/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="theme.css" rel="stylesheet">

<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!--     <script src="../../assets/js/ie-emulation-modes-warning.js"></script> -->

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>



<body>
	<div class="container">

		<header>
			<img alt="logoweb" src="">

			<h1 class="col-xs-10 page-header">
				Jugamos un picon! <small>Red deportiva universitaria</small>
			</h1>
		
			
	<?php if (!$this->session->userdata('username')):?>
			<a class="col-xs-2" href="<?php echo base_url();?>usuario/login">Iniciar
				sesion</a>
		</header>
		<div class="col-xs-12">
			<nav class="navbar navbar-default">
				<ul class="nav navbar-nav">
					<li><a href="<?php echo base_url()?>">Inicio</a></li>
					<li><a href="<?php echo base_url()?>usuario/registrarse">Registrarse</a>
					</li>
					<li><a href="<?php echo base_url()?>">Ver clima</a></li>
				</ul>
			</nav>
		</div>
	<?php else:?>
			<h3 class="col-xs-2">
			Bienvenido <a href=""><?php echo $this->session->userdata('username')?></a>
		</h3>
		<h5 id="cerrar_sesion">
			<a href="<?php echo base_url()?>usuario/cerrar_sesion">Cerrar sesion</a>
		</h5>
		</header>
		<div class="col-xs-12">
			<nav class="navbar navbar-default">
				<ul class="nav navbar-nav">
					<li><a href="<?php echo base_url()?>">Inicio</a></li>
					<li><a href="<?php echo base_url()?>evento/alta">Crear evento</a></li>
					<li><a href="<?php echo base_url()?>evento/listar_eventos">Ver
							eventos</a></li>
					<li><a href="<?php echo base_url()?>">Ver clima</a></li>
					
					<?php
		$ci = &get_instance ();
		$ci->load->model ( 'Usuario_model' );
		$ci->load->model ( 'Roles' );
		

		$usuario = $ci->Usuario_model->get_usuario_by_id ( $this->session->userdata ( 'user_id' ) );
		
		if ($usuario->es_admin()) :
			{
				?>
					<li><a href="<?php echo base_url()?>welcome/admin">Administrar</a></li>
					<?php } endif;?>
				
			</ul>
			</nav>
		</div>
		<?php endif;?>
				
<!-- End Header -->
		
		
		<div class="col-xs-2">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h1 class="panel-title">Usuarios p</h1>
				</div>
				<div class="panel-body">Panel content</div>
			</div>
			<div class="panel panel-default">
				<div class="panel-heading">
					<h1 class="panel-title">Eventos p</h1>
				</div>
				<div class="panel-body">Panel content</div>
			</div>
		</div>

		<div class="col-xs-8">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3>Eventos deportivos</h3>
				</div>
				<img class="panel-body" alt="mapa" src="">
			</div>
		</div>




		<div class="col-xs-2">
			<div class="panel panel-default">
				<div class="panel-body">
					<img alt="publicidad" src=""> <img alt="publicidad2" src="">
				</div>
			</div>
		</div>


<!-- Begin footer -->
		
		<footer class="col-xs-12">
			<nav class="navbar navbar-default navbar-fixed-bottom">
				<div class="container">
					<ul class="nav navbar-nav">
						<li><a href="<?php echo base_url()?>">UNRN</a></li>
						<li><a href="<?php echo base_url()?>">Mapa del sitio</a></li>
						<li><a href="<?php echo base_url()?>">Info</a></li>
						<li><a href="<?php echo base_url()?>">Contacto</a></li>
					</ul>
				</div>
			</nav>

		</footer>
	</div>
</body>
</html>
